package cn.longge.service.impl;

import cn.longge.entity.Qualification;
import cn.longge.mapper.QualificationMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.longge.entity.QualificationCondition;
import cn.longge.service.IQualificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class QualificationServiceImpl extends BaseServiceImpl<Qualification> implements IQualificationService {

    @Autowired
    private QualificationMapper qualificationMapper;

    @Override
    public PageInfo selectByCondition(int page,int pageSize,QualificationCondition qualificationCondition){
        PageHelper.startPage(page,pageSize);
        List<Qualification> qualifications = qualificationMapper.selectByCondition(qualificationCondition);
        return new PageInfo(qualifications);
    }
}
